package com.shixun.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shixun.domain.Leaves;
import com.shixun.dto.LeaveDto;
import com.shixun.service.LeaveService;
import com.shixun.mapper.LeaveMapper;
import com.shixun.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author ASUS
* @description 针对表【leave】的数据库操作Service实现
* @createDate 2023-06-14 10:29:55
*/
@Service
public class LeaveServiceImpl extends ServiceImpl<LeaveMapper, Leaves>
    implements LeaveService{

    @Autowired
    LeaveMapper leaveMapper;


    @Override
    public R leavePage(int pageSize, int pageNum, String sname, String sno) {
        IPage<LeaveDto> helperDtoIPage=new Page<>(pageNum,pageSize);
        IPage<LeaveDto> helperDtoIPage1 = leaveMapper.leavePage(helperDtoIPage, sname, sno);
        return new R(200,"",helperDtoIPage1);
    }

}




